<template>
  <div>
    <svg-icon
      icon-class="fullscreen"
      style="color:#fff; width: 20px; height: 20px"
      @click="changeScreen"
    ></svg-icon>
  </div>
</template>

<script>
import ScreenFull from 'screenfull'
export default {
  name: '',
  components: {},
  props: {},
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    changeScreen() {
      if (!ScreenFull.isEnabled) {
        this.$message.warning('当前全屏功能不可用')
        return
      }
      // 直接全屏
      ScreenFull.toggle() // 全屏方法
    }
  }
}
</script>
<style lang='scss' scoped>
</style>
